Mapping church attendance in time
back to Appendix
The focal variable of interest is attend, the item measuring church attendance for the year that preceded the interview date. The questionnaire recorded the responses on the ordinal scale.
Creating frequency distributions for each of the measurement wave we have:
Here, missing values are used in the calculation of total responses to show the natural attrition in the study. Assuming that attrition is not significantly associated with the outcome measure, we can remove missing values from the calculation of the total and look at prevalence of response endorsements over time.
Tracing the rate of change of prevalence in a line graph, we see more clearly which categores increase over time (e.g. “Never”), which decline (e.g. “”About once/week), and which stay relatively stable (e.g. “About twice/month”).
Inspecting the prevalence trajectories across races.
Bin includes all respondents who were +/- 6 months from a given age expressed as an intiger.s For example, a 16 year-old is defined as an individual between 15.5 and 16.5 years of age at the time of the interview.
The following tables inspect the counts of valid responses (church attendance) across two time metircs (age and NLSY97 round) and cohort membership.
dsL<-readRDS("./Data/Derived/dsL.rds")
ds<- dsL %>% # chose conditions to apply in creating dataset for modeling
dplyr::filter(id %in% c(1:9022)) %.% # 1:9022
dplyr::filter(year %in% c(2000:2011)) %.% # 1997:2011
dplyr::filter(sample %in% c(0,1)) %.% # 0-Oversample; 1-Cross-Sectional
dplyr::filter(race %in% c(1:4)) %.% # 1-Black; 2-Hispanis; 3-Mixed; 4-White
dplyr::filter(byear %in% c(1980:1984)) %>% # birth year 1980:1984
dplyr::mutate(age=year-byear) # define bin for age
length(unique(ds$id)) # total No. of respondents in dataset
[1] 8983
d<- ds %>%
filter(is.na(attend)) # only nonmissing datapoints
table(d$byear,d$year) # Number of respondent in each NLSY97 round
2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011
1980 268 287 282 308 372 384 357 364 364 325 374 394
1981 257 296 292 312 397 458 372 412 402 372 373 377
1982 185 240 229 253 312 335 320 339 334 312 339 364
1983 135 171 178 204 301 316 282 308 295 305 312 327
1984 120 140 138 192 286 307 282 297 311 310 315 330
table(d$byear, d$age) # Number of respondent in each age bin
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
1980 0 0 0 0 268 287 282 308 372 384 357 364 364 325 374 394
1981 0 0 0 257 296 292 312 397 458 372 412 402 372 373 377 0
1982 0 0 185 240 229 253 312 335 320 339 334 312 339 364 0 0
1983 0 135 171 178 204 301 316 282 308 295 305 312 327 0 0 0
1984 120 140 138 192 286 307 282 297 311 310 315 330 0 0 0 0
table(d$age,d$year) # cross-section of age and round of NLSY97
2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011
16 120 0 0 0 0 0 0 0 0 0 0 0
17 135 140 0 0 0 0 0 0 0 0 0 0
18 185 171 138 0 0 0 0 0 0 0 0 0
19 257 240 178 192 0 0 0 0 0 0 0 0
20 268 296 229 204 286 0 0 0 0 0 0 0
21 0 287 292 253 301 307 0 0 0 0 0 0
22 0 0 282 312 312 316 282 0 0 0 0 0
23 0 0 0 308 397 335 282 297 0 0 0 0
24 0 0 0 0 372 458 320 308 311 0 0 0
25 0 0 0 0 0 384 372 339 295 310 0 0
26 0 0 0 0 0 0 357 412 334 305 315 0
27 0 0 0 0 0 0 0 364 402 312 312 330
28 0 0 0 0 0 0 0 0 364 372 339 327
29 0 0 0 0 0 0 0 0 0 325 373 364
30 0 0 0 0 0 0 0 0 0 0 374 377
31 0 0 0 0 0 0 0 0 0 0 0 394
table(d$attend,useNA="always")
<NA>
18123
Such view allows to see quickly whether each cell contains enough observations to offer stability for estimated solutions.
ds<- dsL %>% # chose conditions to apply in creating dataset for modeling
dplyr::filter(id %in% c(1:9022)) %.% # 1:9022
dplyr::filter(year %in% c(2000:2011)) %.% # 1997:2011
dplyr::filter(sample %in% c(0)) %.% # 0-Oversample; 1-Cross-Sectional
dplyr::filter(race %in% c(1)) %.% # 1-Black; 2-Hispanis; 3-Mixed; 4-White
dplyr::filter(byear %in% c(1980:1984)) %>% # birth year 1980:1984
dplyr::filter(sex==1) %>% # 1-Male; 2-Female
dplyr::mutate(age=round(agemon/12,0)) # define bin for age
length(unique(ds$id)) # total No. of respondents in dataset
[1] 632
d<- ds %>%
filter(!is.na(attend)) # only nonmissing datapoints
table(d$byear,d$year) # Number of respondent in each NLSY97 round
2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011
1980 89 89 92 90 80 80 80 82 82 79 79 82
1981 139 127 137 140 113 112 127 121 121 116 123 122
1982 127 116 125 121 107 114 115 109 112 111 110 111
1983 115 112 112 108 96 99 102 100 100 96 93 92
1984 104 96 99 94 84 92 87 81 88 80 93 91
table(d$byear, d$age) # Number of respondent in each age bin
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
1980 0 0 0 0 51 79 102 87 89 79 79 88 77 87 76 82 28
1981 0 0 0 62 151 120 159 106 128 114 138 111 138 96 143 32 0
1982 0 0 57 119 136 116 120 103 128 109 112 116 104 113 45 0 0
1983 0 47 130 102 118 86 118 92 112 89 116 82 108 25 0 0 0
1984 48 102 98 99 89 81 104 81 88 84 83 96 36 0 0 0 0
table(d$age,d$year) # cross-section of age and round of NLSY97
2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011
16 48 0 0 0 0 0 0 0 0 0 0 0
17 103 46 0 0 0 0 0 0 0 0 0 0
18 125 112 48 0 0 0 0 0 0 0 0 0
19 132 99 103 48 0 0 0 0 0 0 0 0
20 128 141 129 104 43 0 0 0 0 0 0 0
21 38 94 123 110 77 40 0 0 0 0 0 0
22 0 48 124 150 119 110 52 0 0 0 0 0
23 0 0 38 100 103 96 86 46 0 0 0 0
24 0 0 0 41 106 129 120 96 53 0 0 0
25 0 0 0 0 32 89 118 102 85 49 0 0
26 0 0 0 0 0 33 101 129 116 97 52 0
27 0 0 0 0 0 0 34 92 119 100 93 55
28 0 0 0 0 0 0 0 28 97 131 104 103
29 0 0 0 0 0 0 0 0 33 80 117 91
30 0 0 0 0 0 0 0 0 0 25 104 135
31 0 0 0 0 0 0 0 0 0 0 28 86
32 0 0 0 0 0 0 0 0 0 0 0 28
Graphs above shows change in the cross-sectional distribution of responses over the years. Modeling the change in these response frequencies is handled well by Markov models. LCM, however, works with longitudinal data, modeling the trajectory of each individual and treating attendance as a continuous outcome.
To demonstrate mapping of individual trajectories to time, let’s select a dataset that would include personal identifyer (id), cohort indicator (byear), wave of measurement (year) and the focal variable of interest - worship attendance (attend).
ds<- dsL %>% dplyr::filter(year %in% c(2000:2011), id==47) %>%
dplyr:: select(id, byear, year, attend, attendF)
print(ds)
id byear year attend attendF
1 47 1982 2000 5 About twice/month
2 47 1982 2001 2 Once or Twice
3 47 1982 2002 4 About once/month
4 47 1982 2003 2 Once or Twice
5 47 1982 2004 3 Less than once/month
6 47 1982 2005 2 Once or Twice
7 47 1982 2006 2 Once or Twice
8 47 1982 2007 3 Less than once/month
9 47 1982 2008 2 Once or Twice
10 47 1982 2009 1 Never
11 47 1982 2010 1 Never
12 47 1982 2011 1 Never
The view above lists attendance data for subjust with id = 47. Mapping his attendance to time we have .
where vertical dimension maps the outcome value and the horizontal maps the time. There will be a trajecory for each of the respondents. Each of such trajectories imply a story, a life scenario. Why one person grows in his religious involvement, while other declines, or never develops an interest in the first place? To demostrate how interpretations of trajectories can vary among individuals consider the following example.
Attendance trajectories of subjects with ids 4, 25, 35, and 47 are plotted in the next graph
The respondent id = 35 reported attending no worship services in any of the years, while respodent id = 25 seemed to frequent it, indicating weekly attendance in 8 out of the 12 years. Individual id = 47 started as a fairly regular attendee of religious services in 2000 (5 = “about twice a month”), then gradually declined his involvement to nill in 2009 and on. Respondent id = 4, on the other hand started off with a rather passive involvement, reporting attended church only “Once or twice” in 2000, maintained a low level of participation throughout the years, only to surge his attendance in 2011. Latent curve models will describe intraindividual trajectories of change, while summarizinig the interindividual similarities and trends.
Previous research in religiousity indicated that age might be one of the primary factors explaining interindividual differences in church attendance. To examine the role of age, we change the metric of time from waves of measurement, as in the previous graph, to biological age. Consult Metrics report for details on measurement of age.
ds<- dsL %>% dplyr::filter(id %in% c(4,25,35,47),year %in% c(2000:2011)) %>%
dplyr::select(idF,byear,bmonth,year,ageyear,agemon) %.%
dplyr::mutate(time=year-2000, age=agemon/12)
print(ds[ds$idF==25,])
idF byear bmonth year ageyear agemon time age
13 25 1983 3 2000 17 214 0 17.83
14 25 1983 3 2001 18 226 1 18.83
15 25 1983 3 2002 19 236 2 19.67
16 25 1983 3 2003 21 254 3 21.17
17 25 1983 3 2004 21 261 4 21.75
18 25 1983 3 2005 22 272 5 22.67
19 25 1983 3 2006 23 284 6 23.67
20 25 1983 3 2007 24 295 7 24.58
21 25 1983 3 2008 25 307 8 25.58
22 25 1983 3 2009 26 319 9 26.58
23 25 1983 3 2010 27 332 10 27.67
24 25 1983 3 2011 28 342 11 28.50
Plotting individual trajectories, with age as the metric of time.
in ./Models/Descriptives:
See also
[model_specification]